
def main():
	f = open('input.txt')
	a = f.readline()
	f.close()

	c = a.split()

	g = int(c[1])
	b = int(c[0])

	r = ""

	if ( b > g ):
		r = 'BG' * g
		r += 'B' * (b-g)
	else:
		r = 'GB' * b
		r += 'G' * (g-b)

	f = open('output.txt', 'w')
	f.write(r)
	f.close()


if __name__ == "__main__":
	main()